﻿package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;

    public class SGuildInfo extends IMessageBase
    {
        public var guildId:int;
        public var guildName:String;
        public var purpose:String;
        public var YY:String;
        public var QQ:String;
        public var playerNum:int;
        public var maxPlayerNum:int;
        public var level:int;
        public var leader:SMiniPlayer;
        public var resource:int;
        public var lastWeekActivity:int;
        public var activity:int;
        public var money:int;
        public var maxMoney:int;
        public var score:int;
        public var camp:int;
        public var rank:int;
        public var campLevel:int;
        public var remainSendMailSecond:int;
        public var deputyLeaderNames:Array;
        public var PresbyterNames:Array;
        public const _type:int = 16101;
        public static var _regist:SGuildInfo = new SGuildInfo(true);

        public function SGuildInfo(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SGuildInfo();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.guildId);
            param1.writeString(this.guildName);
            param1.writeString(this.purpose);
            param1.writeString(this.YY);
            param1.writeString(this.QQ);
            param1.writeInt(this.playerNum);
            param1.writeInt(this.maxPlayerNum);
            param1.writeInt(this.level);
            this.leader.__write(param1);
            param1.writeInt(this.resource);
            param1.writeInt(this.lastWeekActivity);
            param1.writeInt(this.activity);
            param1.writeInt(this.money);
            param1.writeInt(this.maxMoney);
            param1.writeInt(this.score);
            param1.writeInt(this.camp);
            param1.writeInt(this.rank);
            param1.writeInt(this.campLevel);
            param1.writeInt(this.remainSendMailSecond);
            SeqStringHelper.write(param1, this.deputyLeaderNames);
            SeqStringHelper.write(param1, this.PresbyterNames);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.guildId = param1.readInt();
            this.guildName = param1.readString();
            this.purpose = param1.readString();
            this.YY = param1.readString();
            this.QQ = param1.readString();
            this.playerNum = param1.readInt();
            this.maxPlayerNum = param1.readInt();
            this.level = param1.readInt();
            this.leader = new SMiniPlayer();
            this.leader.__read(param1);
            this.resource = param1.readInt();
            this.lastWeekActivity = param1.readInt();
            this.activity = param1.readInt();
            this.money = param1.readInt();
            this.maxMoney = param1.readInt();
            this.score = param1.readInt();
            this.camp = param1.readInt();
            this.rank = param1.readInt();
            this.campLevel = param1.readInt();
            this.remainSendMailSecond = param1.readInt();
            this.deputyLeaderNames = SeqStringHelper.read(param1);
            this.PresbyterNames = SeqStringHelper.read(param1);
            return;
        }// end function

    }
}
